<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ include file="/views/common/resources.jsp" %>         
<!DOCTYPE html>
<html style="height:100%;">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>我的地图</title>
    <link href="${basePath}resources/js/common/plugin/zTree/zTreeStyle.min.css" rel="stylesheet">
    <link href="${basePath}resources/css/matter.css" rel="stylesheet">
    <script type="text/javascript" src="http://webapi.amap.com/maps?v=1.3&key=d782d52560e7b77e0d764b1496c60dde&plugin=AMap.MouseTool,AMap.Geocoder,AMap.Driving"></script>
	<script src="${basePath}resources/js/common/plugin/zTree/jquery.ztree.all-3.5.js"></script>
	<script src="${basePath}resources/js/common/util/common.js"></script>
	
</head>
<body class="matter" style="height:100%;">
<div class="page">	
	<div class="slider pa clearfix">
        <%@ include file="/views/common/menu.jsp" %> 
    </div>	
	 
    <div class="main ">
        <%@ include file="/views/common/top.jsp" %>
        <div class="content pr">
            <div class="map" style='border:1px solid #d0d0d0'>
                <div id="mymap"></div>
            </div>
            <div id="nResizeMoveDiv" class="butDragMove" style="display:none;"></div>
            <div id="nResizeDiv" class="butDrag" title="拖拽" style="display:none;"> <p> 拖拽</p></div>
            <div id="tabTopDiv" style="height: 35px;width:100%;padding-top: 6px;border-top: 1px solid #dedede;">
				<div id="carTips">
					<div id="ctrlPanelDiv" style="float: left;margin-left: 10px;margin-right: 10px;">
						<a class="mapType active fl db" id="mapPoint" href="javascript:void(0)" onclick="clickChangedxm(0)">点</a>
						<a class="mapType fl db" id="mapLine" href="javascript:void(0)" onclick="clickChangedxm(1)">线路</a>
						<a class="mapType fl db" id="mapArea" href="javascript:void(0)" onclick="clickChangedxm(2)">区域</a>
					</div>
					<div class="pr" id="searchDiv" style="float: left;">
                    	<input id="searchTxt" class="inp" type="text" value="搜索:名称" style="width:190px;">
                    </div>
                    <div id="addImportDiv" style="float: left;margin-left: 10px;margin-right: 10px;">
                    	<a id="searchBtn" style="width:40px;" href="javascript:;">查询</a>
                   		<a id="addMatterBtn" onclick="addMatterInfo()" href="javascript:;">添加</a>
                   		<a id="exportMatterBtn" onclick="exportMatterInfo()" href="javascript:;">导出</a>
                  </div>
				</div>

			</div>
            <div id="monitorList" class="monitor-detail" style=" width: 100%;" >
				<div id="customMapPointLiDiv" style="height: 100%; width: 100%;">
					<div id="customMapPointTable"></div>
				</div>
				<div id="customMapLiDiv" style="height: 100%; width: 100%; display: none;">
					<div id="customMapTable"></div>
				</div>
				<div id="customLineLiDiv" style="height: 100%; width: 100%; display: none;">
					<div id="customLineTable"></div>
				</div>
					
			</div>
        </div>
    </div>
</div>

<!-- 点修改框（Modal） -->
<div id="matterPointModal" class="modal hide" tabindex="-1" role="dialog" data-backdrop="static" aria-labelledby="myModalLabel" aria-hidden="true" >
  <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
    <h5 id="myModalLabel">点编辑框</h5>
  </div>
  <div class="modal-body">
      <input type="hidden" id="custommappointID" />
	  <input type="hidden" id="iconSelDiv" />
	  <input type="hidden" id="mDepartment" />
	  <input type="hidden" id="mNameColor" />
      <input type="hidden" id="custommappointAction" value="insert"/>
      <div id="markerOperateT">
      	<ul class="clearfix">
      		<li class="list fl clearfix">
      			<label class="fl">名称:</label>
      			<input id="mName" class="inputCom fl" maxlength="30" valtype="datatype" msg="名称不能为空">
      			<span class="required fl">*</span>
      		</li>
      		<li class="list fl clearfix">
      			<label class="fl">类型:</label>
      			<select class="fl selectCom" id="mCategotySel" name="mCategotySel">
                        <option value="1">工厂</option>
						<option value="2">收费站</option>
						<option value="3">仓库</option>
						<option value="4">码头,堆场</option>
						<option value="5">物流园</option>
						<option value="6">其他</option>
						<option value="7">跟踪点</option>
						<option value="8">网点</option>
						<!-- <option value="9">政府</option>
						<option value="10">火车站</option>
						<option value="11">医院</option> -->
				</select>
				<span class="required fl"></span>
      		</li>
      		<li class="list fl clearfix">
      			<label class="fl">自定义编号:</label>
      			<input id="mCode" class="inputCom fl" maxlength="10">
      		<span class="required fl"></span>
      		</li>
      		<li class="list fl clearfix">
      			<label class="fl">半径:</label>
      			<select class="fl selectCom" id="mRangeSel"> 
                            <option value="50">50m</option>
                            <option value="100">100m</option>
                            <option value="200" selected="selected">200m</option>
                            <option value="500">500m</option>
                            <option value="1000">1000m</option>
                            <option value="1500">1500m</option>
                            <option value="2000">2000m</option>
                 </select>
                 <span class="required fl"></span>
      		</li>
      		<li class="list fl clearfix">
      			<label class="fl">经度:</label>
      			<input id="mLon" class="inputCom fl" maxlength="10">
      			<span class="required fl">*</span>
      		</li>
      		<li class="list fl clearfix">
      			<label class="fl">纬度:</label>
      			<input id="mLat" class="inputCom fl" maxlength="10" >
      			<span class="required fl">*</span>
      		</li>
      		<li class="list fl clearfix">
      			<label class="fl">位置:</label>
      			<input id="mPlace" class="inputCom fl">
      			<span class="required fl"></span>
      		</li>
      		<li class="list fl clearfix">
      			<label class="fl">备注:</label>
      			<input id="mRemark" class="inputCom fl" style="width: 415px;height:30px;">
      			<span class="required fl"></span>
      		</li>
      	</ul>
      </div>
       <!-- <table id="markerOperateT" class="dn">
            <tbody>
                 <tr>
                    <td align="right">
                        <em>*</em>名称：
                    </td>
                    <td>
                        <input id="mName" class="inputCom" style="width: 130px;" maxlength="30" valtype="datatype" msg="名称不能为空">
                    </td>
                    <td align="right">
                       	 类型：
                    </td>
                    <td>
                        
                        <select  id="mCategotySel" name="mCategotySel" style="width:136px;height:30px">
                        <option value="1">工厂</option>
						<option value="2">收费站</option>
						<option value="3">仓库</option>
						<option value="4">码头,堆场</option>
						<option value="5">物流园</option>
						<option value="6">其他</option>
						<option value="7">跟踪点</option>
						<option value="8">网点</option>
						</select>
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        	自编号：
                    </td>
                    <td>
                        <input id="mCode" class="inputCom" style="width: 130px;" maxlength="10">
                    </td>
                    <td align="right">
                       	 半径：
                    </td>
                    <td>
                        <select id="mRangeSel"   style="width: 136px;height:30px"> 
                            <option value="100">50m</option>
                            <option value="100">100m</option>
                            <option value="200" selected="selected">200m</option>
                            <option value="500">500m</option>
                            <option value="1000">1000m</option>
                            <option value="1500">1500m</option>
                            <option value="2000">2000m</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        <em>*</em>经度：
                    </td>
                    <td>
                        <input id="mLon" class="inputCom" style="width: 130px;" maxlength="10">
                    </td>
                    <td align="right">
                        <em>*</em>纬度：
                    </td>
                    <td>
                        <input id="mLat" class="inputCom" style="width: 130px;" maxlength="10" >
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        	位置：
                    </td>
                    <td colspan="3">
                        <input id="mPlace" class="inputCom" style="width: 385px;">
                    </td>
                </tr>
                <tr>
                    <td align="right" valign="top">
                        	备注：
                    </td>
                    <td colspan="3">
                        <textarea id="mRemark" class="textareaCom" style="width: 385px; height: 60px;" rows="" cols="" onpropertychange="if(value.length>100) value=value.substr(0,100)"></textarea>
                    </td>
                </tr>
            </tbody>
        </table> -->

  </div>
  <div class="modal-footer">
    <a class="btn closeBtn" data-dismiss="modal" aria-hidden="true">关闭</a>
    <a class="btn" id="btnSaveMatterPoint" onclick="saveCustomMapPoint()" >保存</a>
  </div>
</div>


<!-- 线修改框（Modal） -->
<div id="matterLineModal" class="modal hide" tabindex="-1" data-backdrop="static" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
    <h5 id="myModalLabel">线编辑框</h5>
  </div>
  <div class="modal-body">
    <input type="hidden" id="customLineID" />
	       <input type="hidden" id="lDepartment" />
	       <input type="hidden" id="lNameColor" />
	        <input type="hidden" id="strokeWeightLI" />
	         <input type="hidden" id="mileageSpan" />
	         <input type="hidden" id="lColor" />
         <input type="hidden" id="customLineAction" value="insert"/>
         <div id="lineOperateT">
         	<ul class="clearfix">
         		<li class="list fl clearfix">
         			<label class="fl">名称</label>
         			<input id="lName" class="inputCom fl" maxlength="30"  />
         			<span class="required fl">*</span>
         		</li>
         		<li class="list fl clearfix">
         			<label class="fl">自定义编号</label>
         			<input id="lCustomcode" class="inputCom fl" maxlength="10">
      <span class="required fl"></span>
         		</li>
         		<li class="list fl clearfix">
         			<label class="fl">开始位置</label>
         			<input id="lStartPlace" class="inputCom fl">
         			<span class="required fl">*</span>
         		</li>
         		<li class="list fl clearfix">
         			<label class="fl">结束位置</label>
         			<input id="lEndPlace" class="inputCom fl">
         			<span class="required fl">*</span>
         		</li>
         		<li class="list fl clearfix">
         			<label class="fl">备注</label>
         			<input id="lRemark" class="inputCom fl" style="width: 415px;height:30px;">
         			<span class="required fl"></span>
         		</li>
         	</ul>
         </div>
        <!-- <table id="lineOperateT">
            <tbody>
            <tr>
                <td align="right">
                    <em>*</em>名称：
                </td>
                <td>
                    <input id="lName" class="inputCom" style="width: 130px;" maxlength="30"  />
                </td>
                <td align="right">
                    	自编号：
                </td>
                <td>
                    <input id="lCustomcode" class="inputCom" style="width: 100px;" maxlength="10">
                </td>
            </tr>
            <tr>
                <td align="right">
                   	 开始位置：
                </td>
                <td colspan="3">
                    <input id="lStartPlace" class="inputCom" style="width: 384px;">
                </td>
            </tr>
            <tr>
                <td align="right">
                    	结束位置：
                </td>
                <td colspan="3">
                    <input id="lEndPlace" class="inputCom" style="width: 384px;">
                </td>
            </tr>
            <tr>
                <td align="right" valign="top">
                    	备注：
                </td>
                <td colspan="3">
                    <textarea id="lRemark" class="textareaCom" style="width: 384px; height: 60px;" rows="" cols="" onpropertychange="if(value.length>100) value=value.substr(0,100)"></textarea>
                </td>
            </tr>
        </tbody></table> -->

  </div>
  <div class="modal-footer">
    <a class="btn closeBtn" data-dismiss="modal" aria-hidden="true">关闭</a>
    <a class="btn" id="btnSaveMatterPoint" onclick="saveLine()" >保存</a>
  </div>
</div>


<!-- 区域修改框（Modal） -->
<div id="matterAreaModal" class="modal hide" tabindex="-1" data-backdrop="static" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
    <h5 id="myModalLabel">区域编辑框</h5>
  </div>
  <div class="modal-body">
    <input type="hidden" id="custommapID" />
         <input type="hidden" id="custommapAction" value="insert"/>
         <input type="hidden" id="txtRadius" value=""/>
         <input type="hidden" id="aDepartment" value=""/>
         <input type="hidden" id="aDrawingType" value=""/>
         <input type="hidden" id="aNameColor" value=""/>
         <div id="areaOperateT">
         	<ul class="clearfix">
         		<li class="list fl">
         			<label class="fl">名称:</label>
         			<input id="aName" class="inputCom wrong-msg fl" maxlength="30" valtype="datatype" msg="名称不能为空" tabindex="-1">
         			<span class="required fl">*</span>
         		</li>
         		<li class="list fl">
         			<label class="fl">自定义编号:</label>
         			<input id="aCode" class="inputCom wrong-msg fl" maxlength="30" valtype="datatype" msg="自编号不能为空" tabindex="-1">
  <span class="required fl"></span>
         		</li>
         		<li class="list fl">
         			<label class="fl">类型:</label>
         			<select class="selectCom fl" id="aCategotySel" name="aCategotySel"> 
                        <option value="1">工厂</option>
						<option value="2">收费站</option>
						<option value="3">仓库</option>
						<option value="4">码头,堆场</option>
						<option value="5">物流园</option>
						<option value="6">其他</option>
						<option value="7">跟踪点</option>
						<option value="8">网点</option>
					</select>
         			<span class="required fl"></span>
         		</li>
         		<li class="list fl">
         			<label class="fl">经度:</label>
         			<input id="aLon" class="inputCom fl" maxlength="10" valtype="datatype" msg="经度不能为空" function="aLonValidator">
         			<span class="required fl">*</span>
         		</li>
         		<li class="list fl">
         			<label class="fl">纬度:</label>
         			<input id="aLat" class="inputCom fl" maxlength="10" valtype="datatype" msg="纬度不能为空" function="aLatValidator">
         			<span class="required fl">*</span>
         		</li>
         		<li class="list fl">
         			<label class="fl">位置:</label>
         			<input id="aPlace" class="inputCom fl">
         			<span class="required fl">*</span>
         		</li>
         		<li class="list fl">
         			<label class="fl">备注:</label>
         			<input id="aRemark" class="inputCom fl" style="width: 415px;height:30px;"></input>
         		</li>
         	</ul>
         </div>
      	<!-- <table id="areaOperateT">
            <tbody>
                <tr id="aAcreageTr">
                    <td align="right" style="width: 80px;">
                        <em>*</em>名称：
                    </td>
                    <td colspan="3">
                        <input id="aName" class="inputCom wrong-msg" style="width: 130px;" maxlength="30" valtype="datatype" msg="名称不能为空" tabindex="-1">
                    </td>
                </tr>
                <tr>
                    <td align="right">
                       	自编号：
                    </td>
                    <td>
                        <input id="aCode" class="inputCom" style="width: 130px;" maxlength="10">
                    </td>
                    <td align="right">
                        	类型：
                    </td>
                    <td>
                        
                        <select class="selectCom" id="aCategotySel" name="aCategotySel" style="width:136px;height:30px"> 
                        <option value="1">工厂</option>
						<option value="2">收费站</option>
						<option value="3">仓库</option>
						<option value="4">码头,堆场</option>
						<option value="5">物流园</option>
						<option value="6">其他</option>
						<option value="7">跟踪点</option>
						<option value="8">网点</option>
						</select>
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        <em>*</em>经度：
                    </td>
                    <td>
                        <input id="aLon" class="inputCom" style="width: 130px;" maxlength="10" valtype="datatype" msg="经度不能为空" function="aLonValidator">
                    </td>
                    <td align="right">
                        <em>*</em>纬度：
                    </td>
                    <td>
                        <input id="aLat" class="inputCom" style="width: 130px;" maxlength="10" valtype="datatype" msg="纬度不能为空" function="aLatValidator">
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        	位置：
                    </td>
                    <td colspan="3">
                        <input id="aPlace" class="inputCom" style="width: 384px;">
                    </td>
                </tr>
                <tr>
                    <td align="right" valign="top">
                        	备注：
                    </td>
                    <td colspan="3">
                        <textarea id="aRemark" class="textareaCom" style="width: 384px; height: 60px;" rows="" cols="" onpropertychange="if(value.length>100) value=value.substr(0,100)"></textarea>
                    </td>
                </tr>
            </tbody>
        </table> -->

  </div>
  <div class="modal-footer">
  	<a class="btn closeBtn" data-dismiss="modal" aria-hidden="true">关闭</a>
    <a class="btn" id="btnSaveMatterPoint" onclick="saveCustomMap()" >保存</a>
  </div>
</div>


<div id="matterAreaSelectModal" class="modal hide" tabindex="-1" data-backdrop="static" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="width:500px;left: 50%;top:20%;">
  <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
    <h5 id="myModalLabel">区域类型</h5>
  </div>
  <div class="modal-body">
  	<div class="center">
  		<a class="matterArea" href="javascript:;" onclick="setCurMatterMap(0)">矩形</a> 
  		<a class="matterArea" href="javascript:;" onclick="setCurMatterMap(1)">圆形</a>   
  		<a class="matterArea" href="javascript::" onclick="setCurMatterMap(2)">多边形</a>
  	</div>
  </div>
  <div class="modal-footer">
  </div>
</div>


<div id="matterLineSelectModal" class="modal hide" tabindex="-1" data-backdrop="static" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="width:500px;left: 50%;top:20%;">
  <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
    <h5 id="LineModalLabel">线路类型</h5>
  </div>
  <div class="modal-body">
  	<div class="center">
  		<a class="setCurMatter" href="javascript:;" onclick="setCurMatterLine(0)">导航</a>
  		<a class="setCurMatter"  href="javascript:;" onclick="setCurMatterLine(1)">自定义</a>
  	</div>
	<!-- <button onclick="setCurMatterLine(0)">导航</button>  <button onclick="setCurMatterLine(1)">自定义</button> -->
  </div>
  <div class="modal-footer">
  </div>
</div>

<div id="matterLineDHModal" class="modal hide" tabindex="-1" data-backdrop="static"  role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="width:400px;left: 30%;top:15%;">
  <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
    <h5 id="LineDHLabel">线路导航</h5>
  </div>
  <div class="modal-body">
  	<div class="list clearfix"><label class="fl">起点：</label><input id="lineStartPosition" class="inputCom fl">  <a class="chose fl" href="javascript:;" onclick="setlinePosition(0)">选择</a> </div>
  	<div class="list clearfix"><label class="fl">终点：</label><input id="lineEndPosition" class="inputCom fl">  <a class="chose fl" href="javascript:;" onclick="setlinePosition(1)">选择</a> </div>
	<div class="list clearfix"><label class="fl">类型：</label><select class="selectCom fl" id="selectDHTypeSel" name="selectDHTypeSel"> 
                        <option value="1" selected="selected">最快捷模式</option>
						<option value="2">最经济模式</option>
						<option value="3">最短距离模式</option>
						<option value="4">考虑实时路况</option>
						</select></div>
	
  </div>
  

  
  <div class="modal-footer">
  	<a class="btn closeBtn" data-dismiss="modal" aria-hidden="true">关闭</a>
  	<a class="btn" id="btnDHMatterPoint" onclick="dhCustomLine()" >导航</a>
  	<a class="btn" id="btnSaveMatterPoint" onclick="gotoEditCustomLine()" >保存</a>
  </div>
</div>

<div id="panel" style="display:none;position: fixed;background-color: white;max-height: 90%;overflow-y: auto;top: 5%;right:5%;width: 280px"></div>
	<script src="${basePath}resources/js/common/main/HashMap.js"></script>
	<script src="${basePath}resources/js/common/main/global.js"></script>
	<script src="${basePath}resources/js/common/main/nav.js"></script>
	<script src="${basePath}resources/js/business/gis/matter.js"></script>

</body>
</html>